#include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>

using namespace std;

void buildVector(std::vector<int> &v, int numItems)
{
    srand(time(NULL));
    for (int i = 1; i <= numItems; ++i)
    {
        v.push_back(rand() % 1000 + 1);
    }
}

void displayVector(vector<int> v)
{
    for (int i = 0; i < v.size(); ++i)
    {
        cout << v[i] << " ";
    }
}

void displayVector(vector<string> v)
{
    for (int i = 0; i < v.size(); ++i)
    {
        cout << v[i] << " ";
    }
}

int main()
{
    std::vector<int> numbers;
    buildVector(numbers, 100);
    displayVector(numbers);
    cout << endl;
    sort(numbers.begin(), numbers.end());
    displayVector(numbers);
    cout << endl;

    std::vector<string> names;
    names.push_back("dave");
    names.push_back("william");
    names.push_back("dozier");
    names.push_back("shawn");
    displayVector(names);
    cout << endl;
    sort(names.begin(), names.end());
    displayVector(names);
    cout << endl;

    return 0;
}
